package com.j.lemon.learn.basic.designModel.观察者模式;

public class ObserverTest {
    public static void main(String[] args) {
        ProductList productList = ProductList.getInstance();
        JingdongObserver jd = new JingdongObserver();
        TaobaoObserver taobao = new TaobaoObserver();
        productList.addProductListObserver(jd);
        productList.addProductListObserver(taobao);
        productList.addProduct("haha");
    }
}
